﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Upload.aspx.cs" Inherits="CMS.Upload" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="/uploadify/uploadify.css" rel="stylesheet" type="text/css" />

    <script src="/uploadify/jquery-1.4.2.min.js"        type="text/javascript"></script>
    <script src="/uploadify/swfobject.js"               type="text/javascript"></script>
    <script src="/uploadify/jquery.uploadify.v2.1.4.js" type="text/javascript"></script>

    <script type="text/javascript">
        var auth = "<% = Request.Cookies[FormsAuthentication.FormsCookieName]==null ? string.Empty : Request.Cookies[FormsAuthentication.FormsCookieName].Value %>";
        var ASPSESSID = "<%= Session.SessionID %>";

        $(document).ready(function () {
            $('#file_upload').uploadify({
                'uploader': '/uploadify/uploadify.swf',
                'script': '/uploadify/Upload.ashx?uId=<%= CurrentUser.AdminUserId %>-<%= ProductId %>',
                'cancelImg': '/uploadify/cancel.png',
                'folder': '/Data/UserData/<%= CurrentUser.AdminUserId %>',
                'auto': true,
                'multi': true,
                'fileExt': '*.jpg;*.png;*.gif;*.bmp;*.jpeg',
                'queueSizeLimit': 10,
                'sizeLimit': 2097151000,
                'scriptData': { ASPSESSID: ASPSESSID, AUTHID: auth }
            });
        });
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <input id="file_upload" type="file" name="file_upload" />
    </form>
</body>
</html>
